const maoFunc = {
	// 设置永久存储的全局数据
	setMaoData : (name, value) => {
		let maoData = maoFunc.getMaoData()
		maoData[name] = value;
		uni.setStorageSync('maoData', maoData);
	},
	/**
	 * 获取永久存储全局数据
	 */
	getMaoData : () => {
		return uni.getStorageSync('maoData') || {};
	},
	/**
	 * 两个数组对象合并
	 */
	mergingArrays : (data, append) => {
		let data_keys = Object.keys(data);
		let append_keys = Object.keys(append);
		for(var i = 0; i < append_keys.length; i++){
			var key = append_keys[i];
			if(data_keys.indexOf(key) == -1){
				data[key] = append[key];
			}
		}
		return data;
	}
}
export default maoFunc